Skip to content

Remove unused crate dependencies - #586

Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits into
mainfrom
agents/unused-dependencies-cleanup
Nov 28, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 2 commits into
mainfrom
agents/unused-dependencies-cleanup

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Removes dependencies that are declared in crate manifests but never used by that crate's code, tests, or features. Cargo.lock drops the corresponding dependency edges.

Crate Removed
pet-env-var-path pet-virtualenv, pet-python-utils, pet-conda, log, lazy_static, regex
pet-global-virtualenvs pet-core, pet-virtualenv, log
pet-homebrew serde, serde_json
pet-jsonrpc pet-core, env_logger
pet-linux-global-python log
pet-mac-commandlinetools log
pet-mac-python-org log
pet-mac-xcode log
pet-pipenv pet-virtualenv
pet-pixi log
pet-poetry serde, serde_json, pet-reporter
pet-pyenv serde
pet-telemetry pet-python-utils, env_logger
pet-venv pet-virtualenv, log
pet-virtualenv pet-fs, log
pet-virtualenvwrapper log
pet-windows-registry pet-python-utils, lazy_static, regex

The Windows CI jobs now install pyenv-win with a shallow git clone of its repository instead of running install-pyenv-win.ps1, whose archive extraction fails on the current runner PowerShell. A workflow test covers the new setup step. This change is cherry-picked from #585.

Drop dependencies that are declared in crate manifests but never
referenced by the crate's sources, tests, or features, and update
Cargo.lock accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added debt Code quality issues dependencies Pull requests that update a dependency file labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Test Coverage Report (Linux)

Result: ✅ Within regression budget

Metric PR Baseline Delta
Lines 85.506% 85.506% +0.000pp
Functions 88.038% 88.038% +0.000pp

Allowed numerical tolerance: 0.01 percentage points.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Performance Report (Linux)

Result: ✅ Within regression budgets

Metric PR Baseline Delta Change Blocking budget Status
Server startup P50 0ms 0ms +0ms +0.0% >5ms and >100% ➖
Server startup P95 0ms 1ms -1ms -100.0% >50ms and >200% ✅
Discovery duration P50 36ms 37ms -1ms -2.7% >25ms and >30% ✅
Discovery duration P95 39ms 41ms -2ms -4.9% >50ms and >50% ✅
Startup-to-first environment P50 7ms 8ms -1ms -12.5% >20ms and >100% ✅
Startup-to-first environment P95 9ms 10ms -1ms -10.0% >25ms and >100% ✅
Cold discovery duration P50 88ms 85ms +3ms +3.5% >100ms and >50% 🔺
Refresh round-trip P50 36ms 37ms -1ms -2.7% >25ms and >30% ✅
Refresh round-trip P95 39ms 41ms -2ms -4.9% >50ms and >50% ✅
Request-to-first environment P50 7ms 7ms +0ms +0.0% >20ms and >100% ➖
Request-to-first environment P95 8ms 9ms -1ms -11.1% >25ms and >100% ✅
Cold refresh round-trip P50 88ms 86ms +2ms +2.3% >100ms and >50% 🔺
Workload PR Baseline
Environments 5 5
Managers 1 1

A regression must exceed both the documented absolute and relative budget. Environment and manager inventories must match exactly within the same inventory schema.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Performance Report (macOS ARM64)

Result: ✅ Within regression budgets

Metric PR Baseline Delta Change Blocking budget Status
Server startup P50 50ms 46ms +4ms +8.7% >100ms and >50% 🔺
Server startup P95 57ms 85ms -28ms -32.9% >750ms and >100% ✅
Discovery duration P50 73ms 90ms -17ms -18.9% >100ms and >50% ✅
Discovery duration P95 105ms 144ms -39ms -27.1% >300ms and >100% ✅
Startup-to-first environment P50 70ms 81ms -11ms -13.6% >150ms and >50% ✅
Startup-to-first environment P95 82ms 157ms -75ms -47.8% >250ms and >100% ✅
Cold discovery duration P50 126ms 138ms -12ms -8.7% >250ms and >50% ✅
Refresh round-trip P50 73ms 91ms -18ms -19.8% >250ms and >50% ✅
Refresh round-trip P95 105ms 145ms -40ms -27.6% >300ms and >100% ✅
Request-to-first environment P50 27ms 32ms -5ms -15.6% >50ms and >50% ✅
Request-to-first environment P95 34ms 51ms -17ms -33.3% >100ms and >100% ✅
Cold refresh round-trip P50 126ms 139ms -13ms -9.4% >600ms and >50% ✅
Workload PR Baseline
Environments 12 12
Managers 1 1

A regression must exceed both the documented absolute and relative budget. Environment and manager inventories must match exactly within the same inventory schema.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Performance Report (macOS)

Result: ✅ Within regression budgets

Metric PR Baseline Delta Change Blocking budget Status
Server startup P50 61ms 63ms -2ms -3.2% >100ms and >50% ✅
Server startup P95 71ms 101ms -30ms -29.7% >750ms and >100% ✅
Discovery duration P50 100ms 97ms +3ms +3.1% >100ms and >50% 🔺
Discovery duration P95 109ms 145ms -36ms -24.8% >300ms and >100% ✅
Startup-to-first environment P50 93ms 108ms -15ms -13.9% >150ms and >50% ✅
Startup-to-first environment P95 111ms 128ms -17ms -13.3% >250ms and >100% ✅
Cold discovery duration P50 157ms 164ms -7ms -4.3% >250ms and >50% ✅
Refresh round-trip P50 100ms 98ms +2ms +2.0% >250ms and >50% 🔺
Refresh round-trip P95 109ms 145ms -36ms -24.8% >300ms and >100% ✅
Request-to-first environment P50 37ms 47ms -10ms -21.3% >50ms and >50% ✅
Request-to-first environment P95 51ms 63ms -12ms -19.0% >100ms and >100% ✅
Cold refresh round-trip P50 157ms 165ms -8ms -4.8% >600ms and >50% ✅
Workload PR Baseline
Environments 10 10
Managers 1 1

A regression must exceed both the documented absolute and relative budget. Environment and manager inventories must match exactly within the same inventory schema.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Test Coverage Report (Windows)

Result: ✅ Within regression budget

Metric PR Baseline Delta
Lines 83.028% 83.028% +0.000pp
Functions 85.379% 85.379% +0.000pp

Allowed numerical tolerance: 0.01 percentage points.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Performance Report (Windows)

Result: ✅ Within regression budgets

Metric PR Baseline Delta Change Blocking budget Status
Server startup P50 10ms 10ms +0ms +0.0% >10ms and >50% ➖
Server startup P95 13ms 14ms -1ms -7.1% >50ms and >100% ✅
Discovery duration P50 157ms 156ms +1ms +0.6% >150ms and >50% 🔺
Discovery duration P95 170ms 161ms +9ms +5.6% >250ms and >100% 🔺
Startup-to-first environment P50 23ms 24ms -1ms -4.2% >25ms and >50% ✅
Startup-to-first environment P95 28ms 39ms -11ms -28.2% >100ms and >100% ✅
Cold discovery duration P50 157ms 156ms +1ms +0.6% >150ms and >50% 🔺
Refresh round-trip P50 158ms 157ms +1ms +0.6% >150ms and >50% 🔺
Refresh round-trip P95 170ms 162ms +8ms +4.9% >250ms and >100% 🔺
Request-to-first environment P50 13ms 14ms -1ms -7.1% >25ms and >50% ✅
Request-to-first environment P95 17ms 27ms -10ms -37.0% >100ms and >100% ✅
Cold refresh round-trip P50 158ms 157ms +1ms +0.6% >150ms and >50% 🔺
Workload PR Baseline
Environments 8 8
Managers 1 1

A regression must exceed both the documented absolute and relative budget. Environment and manager inventories must match exactly within the same inventory schema.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 597235d1-bab7-440a-a583-e790ea7f1962
(cherry picked from commit f4432bd)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the dependency cleanup and Windows CI setup changes.

No open issues 🎉

What changed in this PR

This PR removes unused dependencies from PET’s Rust workspace and updates Windows CI to install pyenv-win without the failing PowerShell archive-extraction step.

Changes:

  • Removes unused dependencies from 17 crate manifests and updates the corresponding Cargo.lock dependency edges.
  • Replaces the pyenv-win installer with a shallow Git clone in three Windows workflows, with explicit clone-failure handling.
  • Adds a Windows workflow test covering script-byte preservation, environment setup, and clone failures.
File Description
scripts/​tests/​test_quality_workflows.py Tests successful and failed Windows pyenv-win setup.
crates/​pet-windows-registry/​Cargo.toml Removes unused Python utilities, lazy_static, and regex dependencies.
crates/​pet-virtualenvwrapper/​Cargo.toml Removes unused log dependency.
crates/​pet-virtualenv/​Cargo.toml Removes unused filesystem and log dependencies.
crates/​pet-venv/​Cargo.toml Removes unused virtualenv and log dependencies.
crates/​pet-telemetry/​Cargo.toml Removes unused Python utilities and env_logger dependencies.
crates/​pet-pyenv/​Cargo.toml Removes unused serde dependency.
crates/​pet-poetry/​Cargo.toml Removes unused serialization and reporter dependencies.
crates/​pet-pixi/​Cargo.toml Removes unused log dependency.
crates/​pet-pipenv/​Cargo.toml Removes unused virtualenv dependency.
crates/​pet-mac-xcode/​Cargo.toml Removes unused log dependency.
crates/​pet-mac-python-org/​Cargo.toml Removes unused log dependency.
crates/​pet-mac-commandlinetools/​Cargo.toml Removes unused log dependency.
crates/​pet-linux-global-python/​Cargo.toml Removes unused log dependency.
crates/​pet-jsonrpc/​Cargo.toml Removes unused core and env_logger dependencies.
crates/​pet-homebrew/​Cargo.toml Removes unused serde and serde_json dependencies.
crates/​pet-global-virtualenvs/​Cargo.toml Removes unused core, virtualenv, and log dependencies.
crates/​pet-env-var-path/​Cargo.toml Removes six unused dependencies.
Cargo.lock Drops dependency edges removed from the manifests.
.github/​workflows/​pr-check.yml Installs pyenv-win through a shallow clone with failure handling.
.github/​workflows/​coverage.yml Applies the clone-based Windows setup to coverage jobs.
.github/​workflows/​coverage-baseline.yml Applies the clone-based Windows setup to baseline jobs.

Review effort: Max

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 7440533 into main Nov 28, 2026
84 of 93 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the agents/unused-dependencies-cleanup branch November 28, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants